package com.wondersgroup.yly.api;

import com.mseap.dtx.reliable.annotation.ReliableActor;
import com.mseap.dtx.tcc.annotation.TccActor;
import com.mseap.framework.exception.BusinessException;
import com.wondersgroup.yly.dto.DemoDTO;

/**
 * @program: yly-demo
 * @description:
 * @author: Zhangxiao
 * @create: 2019-10-08 13:09
 **/
public interface DemoApi {

    @TccActor("TccActor提供者：DemoApi.insert")
    Long insert(DemoDTO demoDTO) throws BusinessException;

    Long insertTry(DemoDTO demoDTO);

    void insertConfirm(DemoDTO demoDTO, Long id);

    void insertCancel(DemoDTO demoDTO, Long id);

    @ReliableActor("可靠消息提供者：DemoApi.updateByPrimaryKey")
    void updateByPrimaryKey(DemoDTO demoDTO) throws BusinessException;
}
